<template>
	<tui-list-cell arrow arrowRight="0" padding="26rpx 0" v-for="(item,index) in dataList" :key="index" @tap="detail(item.id)">
		<view class="thorui-flex__between">
			<view>
				<image v-if="!item.avatar"
					src="https://dn-coding-net-production-pp.codehub.cn/270e73de-2548-406b-9e1c-c0c8481dff90.png"
					class="u-nickname__img"></image>
				<image v-else :src="ossUrl + item.avatar" class="u-nickname__img"></image>
				<text class="tui-text">{{item.nickname}}</text>
			</view>
			<!-- <tui-badge type="danger" :scaleRatio="0.4" margin="0 30rpx 0 0" v-if="!isRead"></tui-badge> -->
		</view>
	</tui-list-cell>
</template>

<script>
	export default {
		name: 'AttentionItem',
		emits: ['clickDetail'],
		props: {
			// 数据列表
			dataList: {
				type: Array,
				default: []
			},
			//oss
			ossUrl:{
				type: String,
				default:''
			}
		},
		data() {
			return {
				isRead: false
			};
		},
		methods: {
			detail(id) { 
				this.$emit("clickDetail", {
					id
				})
			}
		}
	};
</script>

<style>
	/* 关注-列表 */
	.u-nickname__img {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50rpx;
		margin-right: 20rpx;
		vertical-align: middle;
	}
	
	.tui-text {
		font-size: 30rpx;
		font-weight: 600;
	}
</style>